package com.bdmc.alarm.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bdmc.common.annotation.ExcelDictFormat;
import com.bdmc.common.convert.ExcelDictConvert;
import com.bdmc.common.convert.LocalDateTimeConverter;
import com.bdmc.device.domain.vo.DevGpsHistoryVo;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 告警事件视图对象 alarm_event
 *
 * @author bdmc
 * @date 2022-03-10
 */
@Data
@ExcelIgnoreUnannotated
public class AlarmEventVo {

	private static final long serialVersionUID = 1L;

    /**
     * 事件id
     */
	private Long eventId;

	private Long deviceId;

    /**
     * person或car
     */
	//@ExcelProperty(value = "person或car")
	private String targetType;

    /**
     * 报警规则类型
     */
	@ExcelProperty(value = "报警规则类型",converter = ExcelDictConvert.class,order = 6)
	@ExcelDictFormat(dictType="alarm_type")
	private String alarmType;

    /**
     * 车辆id
     */
	private Long carId;

    /**
     * 人员id
     */
	private Long personId;

    /**
     * 排班计划详细id
     */
	private Long workPlanId;

	private Long workTeamId;

	/**
	 * 围栏id
	 */
	private Long fenceId;

    /**
     * 事件开始时间
     */
	@ExcelProperty(value = "事件开始时间",converter = LocalDateTimeConverter.class,order = 7)

	private LocalDateTime eventStart;

    /**
     * 事件结束时间
     */
	@ExcelProperty(value = "事件结束时间",converter = LocalDateTimeConverter.class,order = 8)
	private LocalDateTime eventEnd;

    /**
     * 事件是否已结束，0=未结束，1=已结束
     */
	@ExcelProperty(value = "事件是否已结束",order = 9,converter = ExcelDictConvert.class)
	@ExcelDictFormat(dictType = "alarm_yes_or_no")
	private Integer eventFinish;

    /**
     * 事件描述
     */
	//@ExcelProperty(value = "事件描述",order = 10)
	private String eventDesc;

    /**
     * 持续时长 分钟
     */
	@ExcelProperty(value = "持续时长(分钟)",order = 11)
	private Long persistTime;

	private Long deptId;

	//部门
	@ExcelProperty(value = "部门",order = 1)
	private String deptName;

	@ExcelProperty(value = "车牌号",order = 5)
	private String carNum;

	@ExcelProperty(value = "人员",order = 4)
	private String personName;
	@ExcelProperty(value = "排班",order = 2)
	private String workPlanName;
	@ExcelProperty(value = "班组",order = 3)
	private String workTeamName;

	private List<DevGpsHistoryVo> alarmDetailList;
}
